package com.encapi.samples.config;

import com.encapi.framework.annotation.EnableEncApiSupport;
import com.encapi.framework.wrapper.RequestDataWrapper;
import com.encapi.framework.wrapper.ResponseDataWrapper;
import com.encapi.framework.wrapper.request.DefaultRequestDataWrapper;
import com.encapi.framework.wrapper.response.FastjsonResponseDataWrapper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 加解密配置
 * @author xzbcode
 */
@EnableEncApiSupport
@Configuration
public class EncapiConfig {

    // 提供一个请求包装器
    @Bean
    public RequestDataWrapper requestDataWrapper() {
        return new DefaultRequestDataWrapper();
    }

    // 提供一个响应包装器
//    @Bean
//    public ResponseDataWrapper responseDataWrapper2() {
//        return new FastjsonResponseDataWrapper();
//    }

}
